home *** CD-ROM | disk | FTP | other *** search
- Hello Johan,
-
- Thank you for your kind letter. I am glad that my code has been helpful to
- you. As far as advertising it more in rec.games.programmer, well, there are
- *LOTS* of different opinions there on how Doom works. Who knows, my
- implementation may not even be the one used in ID's engine - but I think it is.
-
- So, a couple of questions:
- - Have you given any though as to how sprite clipping would be handled?
-
- Actually, I had thought that I would sort the sprites and draw them with a
- painter algorithm somehow. I'm still not sure how I'd go about clipping them
- to the walls and stuff.
-
- - Have you done anything else on the program since you released it?
-
- No I haven't made any improvements to the code. It's been sitting around on
- my HD gathering dust since last Christmas.
-
- - Any ideas on what could be improved/optimized?
-
- Well, the BSP faq *claims* that the backface culling can be done in one
- instruction. I disagree with this, but I'm still trying to proove myself wrong.
- I've heard that using a non-recursive method for traversing the tree will
- speed things up. I experimented with this one time and it slowed the engine
- down by a factor of 10! I was probably doing it wrong though.
-
- - Do you know if anyone else is using the sources?
-
- I've gotten several letters from people like yourself. I posted the code both
- on r.g.p and on compuserve. Several of them have ported it to WinG for Windows
- and Windows NT, as well as Linux. Most people have ported it to the Watcom
- compiler (but the exe is still faster under MSVC 1.5 - go figure). I gave one
- guy permission to use it in a book on windows game programming, but I haven't
- heard anything from him in a while. Haven't seen the book on the shelves
- either.
-
- Finally a couple of bug reports:
- - For some of the load routines the calculation of the number of
- structure items to load is less than perfect (negative results can occur).
- The (short) typecast is in the wrong position.
-
- I was not aware of this one. Thanks.
-
- - You may have noticed that there are sometimes very strange distortions
- near the 'front'. I've traced this to the first of your clippings, the
- one where you clip to an x=z line.
- If you remove that clipping completely, everything works nicely.
- Was there a reason for the clip?
- If so, why only clip the 'from' coordinates and not the 'to' ones (or
- perhaps it was the other way around)?
-
- The field of vision is 90 degrees. So if you clip the walls against x=z this
- will take care of your left and right side screen clipping. I *could* handle
- this in the line drawing part, but there is another reason for doing it here.
- The other reason is for texture mapping. I know, I'm not doing any texture
- mapping, but I was trying to when I wrote it. I clip on the x=z (left side) do
- determine the offset into the texture for the wall. Otherwise it would look
- like the wall was crawling along with you when you moved. The reason that I do
- not clip on the right side is because I was drawing the textures from left to
- right, and I can just stop drawing when I reach the right side of the screen.
- This does not affect the way that the texture looks.
- I hope that makes sense. Anyway, if you aren't doing any texmapping, the you
- could probably take all that stuff out of the code. especially if you get a
- speed increase.
-
-
- By the way, the maze looks much better if you let the name of the textures
- used set the colours (I XOR the characters in the name right now, but a
- more sophisticated algorithm would be better).
-
- Hmmm, thats a good idea. I'll give it a shot.
-
-
- Thanks for all of your questions and suggestions. If you have any more, feel
- free to send me some mail.
-
- Jake Hill
- jkhil@dbsoftware.com
-
-
-